﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ManagerReview.ascx.cs" Inherits="Admin_Views_module_ManagerReview" %>
<script>
    function confirm_delete() {
        if (confirm("Bạn có chắc chắn muốn xóa") == true) {
            return true;
        }
        else {
            return false;
        }
    }

</script>
<form id="form1" runat="server">
<div class="box">
    <div class="left">
    </div>
    <div class="right">
    </div>
    <div class="heading">
        <h1 style="background-image: url('Views/Image/review.png');">
            <span>Đánh giá</span>
        </h1> 
    </div>
    <div class="content">
        <asp:DataList ID="dtList"  width="100%" runat="server" 
            oneditcommand="dtList_EditCommand" onupdatecommand="dtList_UpdateCommand"
            DataKeyField="review_id" ondeletecommand="dtList_DeleteCommand">
        <HeaderTemplate>
            <table width="100%" class="tableadmin">
            <tr class="trhead">
                <b>
                <th align=center>
                Sản phẩm  
                </th>
                <th align=center>
                Người gửi  
                </th >
                <th align=center>
                Tiêu đề
                </th>
                <th align=center>
                Nội dung
                </th>
                <th align=center>
                Hiện trạng  
                </th>
                <th align=center>
                Công việc  
                </th>
                </b>
            </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td align=center><%# Eval("product_name") %></td>
                <td align=center><%# Eval("customer_name")%></td>
                <td align=center><%# Eval("subject")%></td>
                <td align=center><%# Eval("comment")%></td>
                <td align=center>
                   <%# Eval("status") %></td>
                <td align=center>
                    <asp:ImageButton ID="imgbtnEdit" ImageUrl="~/Image/Edit.gif" CommandName="Edit" runat="server" />&nbsp;<asp:ImageButton
                        ID="imgbtnDelete" ImageUrl="~/Image/Delete.gif" CommandName="Delete" runat="server" OnClientClick="return confirm_delete()" /></td>

            </tr>
        </ItemTemplate>
        <EditItemTemplate>
            <tr>
                <td align=center><%# Eval("customer_name")%> &nbsp; <asp:Label ID="lbCustomerId" runat="server" Text='<%# Eval("customer_id")%>' Enabled = false></asp:Label></td>
                <td align=center><%# Eval("product_name") %> &nbsp;<asp:Label ID="lbProductId" runat="server" Text='<%# Eval("product_id")%>' En = false></asp:Label></td>
                <td align=center>
                    <asp:TextBox ID="txtComment" runat="server" Text='<%# Bind("comment")%>' TextMode=MultiLine></asp:TextBox>
                    
                </td>
                <td align=center>
                    <asp:TextBox ID="txtSubject" runat="server" Text='<%# Bind("subject") %>'></asp:TextBox>
                    </td>
                <td align=center>
                    <asp:TextBox ID="txtStatus" runat="server" Text="<%# Bind('status')%>"></asp:TextBox>
                </td>
                <td align=center>
                    <asp:Button ID="btnOK" runat="server" Text="Lưu" onclick="btnOK_Click" CommandName="Update" />&nbsp;
                    <asp:Button ID="btnCancel" runat="server" Text="Hủy" onclick="btnCancel_Click" />
                    
                </td>
            </tr>
        </EditItemTemplate>
        </asp:DataList>
            </table>
    </div>
</div>
</form>